package main

import "fmt"

type Base struct {
	name string
	age int
}

func (base *Base) Set(myname string, myage int) {
	base.name = myname
	base.age = myage
}

type Derived struct {
	Base
	name string
}

func main() {
	b := &Derived{}

	b.Set("sina", 30)
	fmt.Println("b.name =",b.name, "\tb.Base.name =", b.Base.name)
	fmt.Println("b.age =",b.age, "\tb.Base.age =", b.Base.age)

}